<ui:component xmlns="http://www.w3.org/1999/xhtml"  
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.prime.com.tr/ui"> 
    
<h:form enctype="multipart/form-data">  

<p:growl id="messages" showDetail="true"/>  

<p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}"  
        mode="advanced"  
        update="messages"   
        sizeLimit="1000000"  
        allowTypes="pdf,doc,docx"
        label="Selecionar"
        cancelLabel="Cancelar"
        dragDropSupport="true"     
        uploadLabel="Enviar"
        invalidFileMessage="Arquivo Inválido"
      
      	/>  
</h:form>  
 
</ui:component>